﻿{include file=header.html}
<script language="javascript" type="text/javascript" src="{res file=js/jquery-1.2.6.js}"></script>
<script language="javascript" type="text/javascript" src="{lib file=jquery.plugins/jquery.validate.js}"></script>
<script type="text/javascript">
$(function(){
     $('#brand_form').validate({
        onkeyup : false,
		onfocusout : false,
		rules : {
			type_name: {
				required: true,
				remote: 'index.php?app=disreason&act=check_type_name&type_name=' + $('#type_name').val() + '{if $smarty.get.act eq 'edit'}&did={$smarty.get.did}{/if}'
			}
		},
		messages : {
			type_name: {
				required: '折扣原因不能为空',
				remote: '折扣原因名称已存在'
			}
		}
	});
});
</script>
<style>
label.error {margin-left:2em; color:#FF0000;}
.tab-frame{width:700px;}

</style>
<body>
<div class="sub-body">
<div class="tab-frame">
<div class="tab-title-1">
<!--{if $smarty.get.act eq 'add'}--><span>添加折扣原因</span><!--{else}--><span>编辑折扣原因</span><!--{/if}-->
</div>
<form action="{url app=disreason&act=$smarty.get.act}{if $smarty.get.did}&amp;did={$smarty.get.did}{/if}" method="post" id="brand_form">
<table width="100%" cellspacing="0" cellpadding="0" class="tab-display">
	<tr>
		<th width="100" align="right">折扣原因名称：</th>
		<td align="left"><input type="text" name="type_name" id="type_name" value="{$disreason_info.type_name}" /></td>
	</tr>
	<tr>
		<td colspan="2" align="center"><input type="submit" value="{$lang.submit}" class="btn-2"/></td>
	</tr>
</table>
</form>
<script language="javascript" type="text/javascript" src="{res file=js/tab_color.js}"></script>
</div>
</div>
</body>
</html>